Skip to content

[CDAP-21093] Add ExternalDocumentationLink in abstract sink#533

Merged
psainics merged 1 commit intodata-integrations:developfrom
cloudsufi:patch/absink-getExternalDocumentationLink
Jan 22, 2025
Merged

[CDAP-21093] Add ExternalDocumentationLink in abstract sink#533
psainics merged 1 commit intodata-integrations:developfrom
cloudsufi:patch/absink-getExternalDocumentationLink

Conversation

@psainics
Copy link
Contributor

@psainics psainics commented Dec 23, 2024

Add ExternalDocumentationLink in abstract sink

Jira : CDAP-21093

Description

The AbstractDBSink class also throw SQLException, we also need to make the changes similar to AbstractDBSource there as well.

Ref: #530

Code change

  • Modified CloudSQLMySQLSink.java
  • Modified CloudSQLPostgreSQLSink.java
  • Modified AbstractDBSink.java
  • Modified AbstractDBSource.java
  • Modified MysqlSink.java
  • Modified PostgresSink.java

@psainics psainics added the build label Dec 23, 2024
@psainics psainics self-assigned this Dec 23, 2024
@psainics psainics force-pushed the patch/absink-getExternalDocumentationLink branch from c1663bf to 2018b92 Compare December 23, 2024 07:50
@psainics psainics marked this pull request as ready for review December 23, 2024 11:06
@psainics psainics requested a review from sahusanket December 23, 2024 11:06
@psainics psainics force-pushed the patch/absink-getExternalDocumentationLink branch from 2018b92 to 08ccb27 Compare December 27, 2024 09:33
@psainics psainics force-pushed the patch/absink-getExternalDocumentationLink branch from 08ccb27 to 5952ef7 Compare December 27, 2024 09:35
externalDocumentationLink);
}
throw ErrorUtils.getProgramFailureException(new ErrorCategory(ErrorCategory.ErrorCategoryEnum.PLUGIN),
e.getMessage(), errorMessageWithDetails, ErrorType.USER, false, ErrorCodeType.SQLSTATE,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why errorType USER, this should come based on sqlState right?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is in abstract sink, sqlState is not reliable. this snippet was taken from the abstract source.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

throw ErrorUtils.getProgramFailureException(new ErrorCategory(ErrorCategory.ErrorCategoryEnum.PLUGIN),
e.getMessage(), errorMessageWithDetails, ErrorType.USER, false, ErrorCodeType.SQLSTATE,
e.getSQLState(), externalDocumentationLink, new SQLException(e.getMessage(),
e.getSQLState(), e.getErrorCode()));
} finally {
driverCleanup.destroy();
}

@@ -175,6 +179,16 @@ protected String getErrorDetailsProviderClassName() {
return DBErrorDetailsProvider.class.getName();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we also change this to null in both source & sink?

Copy link
Contributor Author

@psainics psainics Jan 22, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

WIP Ref: #540

Looking into the E2E failures.

@psainics psainics merged commit e0ea94f into data-integrations:develop Jan 22, 2025
9 checks passed
@psainics psainics deleted the patch/absink-getExternalDocumentationLink branch January 22, 2025 12:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants